<template>
  <a-upload
    list-type="picture-card"
    action="/"
    image-preview
    :custom-request="customReques"
    :on-before-remove="beforeRemove"
    :multiple="true"
    :file-list="fileList"
  />

  <a-button type="primary" @click="getUpdata">
    <template #icon>
      <icon-plus />
    </template>
    确认无误后点击上传文件
  </a-button>
</template>
<script lang="ts">
import { toRefs } from 'vue';
import importConfigFunction from './uploadFile';
export default {
  props: {
    imgList: {
      type: Object,
      default: null,
    },
  },
  setup(props, option) {
    const { base, customReques, beforeRemove, getUpdata } = importConfigFunction(props, option);

    return {
      ...toRefs(base),
      customReques,
      beforeRemove,
      getUpdata,
    };
  },
};
</script>

<style scoped></style>
